package com.hsylient.javase.chapter02;

import java.time.LocalDate;

/**
 * 定义一个员工类
 */
public class Employ {
    private String name;
    private double salary;
    private LocalDate hireDay;

    public Employ(String n, double s, int y, int m, int d) {
        this.name = n;
        this.salary = s;
        this.hireDay = LocalDate.of(y, m, d);
    }

    public String getName() {
        return this.name;
    }

    public double getSalary() {
        return this.salary;
    }

    public LocalDate getHireDay() {
        return this.hireDay;
    }

    public void raiseSalary(int n) {
        this.salary += this.salary * n / 100;
    }
}
